/*
* qiudot.com Inc.
* Copyright (c) 2019 All Rights Reserved.
* create by qiudot
* date:2019-09-11
*/
package com.lora.web;

import com.acooly.core.common.web.AbstractJQueryEntityController;
import com.google.common.collect.Maps;
import com.lora.entity.Infraredinduction;
import com.lora.service.InfraredinductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 红外感应器数据 管理控制器
 * 
 * @author qiudot
 * Date: 2019-09-11 23:47:23
 */
@Controller
@RequestMapping(value = "/manage/lora/infraredinduction/infraredinduction")
public class InfraredinductionManagerController extends AbstractJQueryEntityController<Infraredinduction, InfraredinductionService> {
	
	private static Map<Integer, String> allStates = Maps.newLinkedHashMap();
	static {
		allStates.put(0, "正常");
		allStates.put(1, "告警");
		allStates.put(2, "故障");
		allStates.put(3, "预热");
	}
	private static Map<Integer, String> allBatterystates = Maps.newLinkedHashMap();
	static {
		allBatterystates.put(0, "正常");
		allBatterystates.put(1, "电池低电量");
	}
	private static Map<Integer, String> allTamperstates = Maps.newLinkedHashMap();
	static {
		allTamperstates.put(0, "正常");
		allTamperstates.put(1, "被拆");
	}
	private static Map<Integer, String> allKeystates = Maps.newLinkedHashMap();
	static {
		allKeystates.put(0, "正常");
		allKeystates.put(1, "按键自检");
	}

	{
		allowMapping = "*";
	}

	@SuppressWarnings("unused")
	@Autowired
	private InfraredinductionService infraredinductionService;

	
	@Override
	protected void referenceData(HttpServletRequest request, Map<String, Object> model) {
		model.put("allStates", allStates);
		model.put("allBatterystates", allBatterystates);
		model.put("allTamperstates", allTamperstates);
		model.put("allKeystates", allKeystates);
	}

}
